/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package login.beans;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;

/**
 *
 * @author Javier
 */
@ManagedBean
@RequestScoped
public class PrincipalPageBean implements Serializable{
    
    public static String centerPage;

    public String getCenterPage() {
        return centerPage ;
    }

    public void setCenterPage(String centerPage) {
        
         FacesContext fc = javax.faces.context.FacesContext.getCurrentInstance();
        if (fc.getExternalContext().getSessionMap().containsKey("administracionTableSpaceBean")) {
            fc.getExternalContext().getSessionMap().remove("administracionTableSpaceBean");
        }
        if (fc.getExternalContext().getSessionMap().containsKey("administracionDataFileBean")) {
            fc.getExternalContext().getSessionMap().remove("administracionDataFileBean");
        }
        if (fc.getExternalContext().getSessionMap().containsKey("administracionTempFileBean")) {
            fc.getExternalContext().getSessionMap().remove("administracionTempFileBean");
        }
        if (fc.getExternalContext().getSessionMap().containsKey("modifyTableSpaceBeanPermanent")) {
            fc.getExternalContext().getSessionMap().remove("modifyTableSpaceBeanPermanent");
        }
        if (fc.getExternalContext().getSessionMap().containsKey("modifyTableSpaceBeanTemporary")) {
            fc.getExternalContext().getSessionMap().remove("modifyTableSpaceBeanTemporary");
        }
        if (fc.getExternalContext().getSessionMap().containsKey("modifyTableSpaceBeanUndo")) {
            fc.getExternalContext().getSessionMap().remove("modifyTableSpaceBeanUndo");
        }
        
        this.centerPage = centerPage;
    }

}
